<div class="row-fluid">
	<div class="span12">
		<div class="operation">
			<form action="<?php echo BASE_URL?>users/search" method="post">
				<div class="input-append">
				    
				    <div class="input-prepend">
				    	<input type="search" value="<?php echo isset($str)?$str:""; ?>" name="txt-search" id="appendedInputButton" placeholder="User name">						
						<a href="" class="btn add-on submit"><i class="icon-search"></i> Search</a>
					</div>				    
				    
				</div>
				<a href = "<?php echo BASE_URL?>users/add" class="btn"><i class="icon-plus"></i> Add New</a>
			</form>	
		</div>		
	</div>	
</div>
<div class="row-fluid">
	<div class="span12">
		<table class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th>No.</th>
				<th>Username</th>
				<th>Fullname</th>
				<th>Gender</th>
				<th>Group Type</th>
				<th>Status</th>
				<th>Created</th>
				<th>Modified</th>
				<th>Option</th>
			</tr>
		</thead>
		<tbody>
			<?php 		
					$i = 0;
					if(count($records)){
						foreach($records as $record){
							$i++;
							echo '
								<tr>
								<td class="">' . $i . '</td>
								<td>' . $record -> email_address . '</td>
								<td class="">' . $record -> fullname . '</td>
								<td>' . $record -> gender . '</td>
				    			<td>' . $record -> description . '</td>
				    			<td class="text-center">' . $record -> status . '</td>
								<td class="text-center">' . $record -> created . '</td>
								<td  class="text-center"="text-center">' . $record -> modified . '</td>
								<td class="text-center">									
									<a href="' . getController('url') . 'edit/' . $record -> id . '">Edit</a> |
									<a href="' . getController('url') . 'reset-password/' . $record -> id . '">Reset Password</a> |
									<a href="' . getController('url') . 'delete/' . $record -> id . '" onclick="if(!confirm(\'Do you want to delete this Username [' . $record -> email_address . ']?\')) return false;">Delete</a>
								</td>
								</tr>
							';
						}
					}else{
						echo '
							<tr>
								<td colspan="9" align="center" class="text-center">Search not found...</td>
							</tr>
							';
					}
			?>
		</tbody>
		</table>	
	</div>
</div>
